package com.itheima.chapter10.volatile1;
//volatile关键字解决获取共享资源最新值

public class Demo {
    public static void main(String[] args) {
        Mythread1 m1=new Mythread1();
        Mythread2 m2= new Mythread2();
        m1.setName("666");
        m2.setName("%%%");
        m1.start();
        m2.start();
    }
}
